add option for height offset fix #67 #68
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
in vertical scaling this accounts for used spaced in the terminal such as a prompt
This is a bug fix that resolves the display of scaling to the max terminal height. In reality the prompt get shown immediately after the image is displayed in the buffer, resulting in a view of a cutoff image. Adding an offset (optional) allows for users to change the effective max terminal height which their image is scaled against to render the complete image in their currently open terminal window.
This also fixes jarring updates from gifs. As if the displayed gif is larger than the display buffer, the gif is not played out smoothly in the terminal. Adding this offset allows scaling of the gif to fit the displayed buffer (this includes the user shell prompt) to ensure the smooth playback of the gif.
This can be treated as a feature request, however it primarily solves a vertical scaling display bug.
fixes #67
this issue could also be fixed by #69
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
fix #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information:
An alternative to
catimg
, chafa properly resolves this issue and scales according with user prompts. For a workaround and temporary solution, users can use chafa.